package com.weeho.dongyong.dao;

import com.weeho.dongyong.entity.Organization;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class OrganizationDao extends BaseDao {
    public int insertSelective(Organization record) {
        return sqlSession.insert("insertOrganizationByPrimaryKey", record);
    }

    public int updateByPrimaryKeySelective(Organization record) {
        return sqlSession.update("updateOrganizationByPrimaryKeySelective", record);
    }

    public int deleteByPrimaryKey(long id) {
        return sqlSession.update("deleteOrganizationByPrimaryKey", id);
    }

    public Organization selectByPrimaryKey(long id) {
        return sqlSession.selectOne("selectOrganizationByPrimaryKey", id);
    }

    public List<Organization> selectByCondition(Organization record) {
        return sqlSession.selectList("selectOrganizationByCondition", record);
    }
}